# -*- coding: utf-8 -*-
from django.http import HttpResponse


def jinstep1(request):
    return HttpResponse(u"ret:more\n\n车价号后六位:chejia6")

def jinstep2(request):
    return 

entries={
   u"晋":(jinstep1,jinstep2),
}

def step1(request):
    if not request.GET.has_key("chepai"):
        return HttpResponse(u"ret:必须提供车牌号码")
    chepai=request.GET["chepai"]
    if entries.has_key(chepai[:1]):
        return entries[chepai[:1]][0](request)
    if chepai[:1]==u"晋":
        return  HttpResponse(u"ret:相信不用多久就可以支持此地区的查询")
    return HttpResponse(u"ret:尚未支持此地区的查询:"+chepai[:1])

def step2(request):
    if not request.GET.has_key("rid"):
        return HttpResponse(u"ret:非法的请求")
    if entries.has_key(chepai[:1]):
        return entries[chepai[:1]][1](request)
    return HttpResponse(u"ret:非法查询")
